Practical Case


Problem 1
Open the People project previously created. Add the Train.lab file to test a Kohonen network using unsupervised training to classify the people who were describe in the section of Unsupervised Training > Input Normalization. Use Multiplicative input normalization, Additive Training, a learning rate of 0.2 and 1000 iterations.

trainSetIn_notepad

trainSetIn_csv

Solution 1
After editing the file, run the program several times until you get the smallest error.

People\Train.lab
Matrix trainSetIn;
trainSetIn.Load();

KohoNet net;
net.Create(3, 5, 1); // 3 Inputs, 5 Outputs, 1 = Multiplicative
net.SetInScaler(0, 58, 103.7); // Weight in Kg
net.SetInScaler(1, 147.8, 196.1); // Height in cm
net.SetInScaler(2, 74.3, 94.8); // Waist in cm
net.SetTrainingSet(trainSetIn, false);
net.TrainAdditive(0.2, 1000);
net.Save();

error

Problem 2
Add the CheckTraining.lab file to check the training of the Kohonen network of the previous problem.

Solution 2
After editing the file, run the program, and double click the winner variable from the variable list. Each neuron will try to group the people from the same country. Because unsupervised training is used, your results may be different from the one shown below. However, people from the same country MUST be classified in the same class.

People\CheckTraining.lab
//_________________________________ Load Input and Network
KohoNet net;
net.Load();
Matrix trainSetIn;
trainSetIn.Load();
//_________________________________ Compute Winner
Vector winner = net.ComputeWinner(trainSetIn);

winnerVariable

winners

Problem 3
You can verify the training of the Kohonen network in problem 1.

Solution 3
Run the CheckTraining.lab program, and double click the network from the variable list. Then, use drop down list for the input to select the trainSetIn.csv file. The figure must be similar to the one displayed below. At the top of the window, Neural Lab indicates which columns are shown: 0 (Weight) and 1 (Height). Each input case is displayed by a cross. Also at the top of the window, Neural Lab indicates which neuron (class) is selected, in this case Neuron 0 is selected. Observe that all input cases in the Class of Neuron 0 are displayed in blue. Move the scrollbar at the bottom to select another class.

network

neuron0

neuron1

neuron2

Problem 4
Verify the training of the Kohonen network in problem 1. Review Weight and Waist.

Solution 4
Move the scrollbar at the right to select the columns: 0 (Weight) and 2 (Waist).

netClassView02

Problem 5
Verify the training of the Kohonen network in problem 1. Review Height and Waist.

Solution 5
Move the scrollbar at the right to select the columns: 1 (Height) and 2 (Waist).

netClassView12

Tip
As a Kohonen networks has many inputs. It is possible to see only two variables at a time. Each neuron must try to group all input case that are close to each other. The group exists in an N-Dimensional space. In some cases, it is very difficult to see the elements of a class as some classes may overlap when viewed in a 2 Dimensional space.

Tip
Use the Case ViewCase View to locate a specific cases in the diagram. You may use the scrollbar at the bottom to select another input case.

Problem 6
Repeat problem 1, 2, 3 using Subtractive Training. Files: TrainMS.lab and CheckTrainMS.lab. (Use Multiplicative input normalization)

Problem 7
Repeat problem 1, 2, 3 using Z-Axis normalization and Additive Training. Files: TrainZA.lab and CheckTrainZA.lab.

Problem 8
Repeat problem 1, 2, 3 using Z-Axis normalization and Subtractive Training. Files: TrainZS.lab and CheckTrainZS.lab.

Problem 9
Indicate whether the following statement is true or false: A student is training a Kohonen network, during training the maximum error did not reduce. In order to reduce the error, the student must increase the number of outputs.

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home